package com.example.persistence;

import java.util.HashMap;
import java.util.Map;

public class PersistenceConstant {
    public static final String ruleDir = System.getProperty("user.home") + "\\sentinel\\rules\\";

    public static final Map<String, String> ruleMap = new HashMap<>();

    public static final String FLOW_RULE_PATH = "flow-rule";
    public static final String DEGRADE_RULE_PATH = "degrade-rule";
    public static final String SYSTEM_RULE_PATH = "system-rule";
    public static final String PARAM_FLOW_RULE_PATH = "param-flow-rule";
    public static final String AUTHORITY_RULE_PATH = "authority-rule";

    static {
        ruleMap.put(FLOW_RULE_PATH, ruleDir + "flow-rule.json");
        ruleMap.put(DEGRADE_RULE_PATH, ruleDir + "degrade-rule.json");
        ruleMap.put(SYSTEM_RULE_PATH, ruleDir + "system-rule.json");
        ruleMap.put(PARAM_FLOW_RULE_PATH, ruleDir + "param-flow-rule.json");
        ruleMap.put(AUTHORITY_RULE_PATH, ruleDir + "authority-rule.json");
    }
}
